package com.ysx.oa.teacher.dao;
import com.ysx.oa.clazz.bean.ClazzBean;
import com.ysx.oa.clazz.bean.ClazzStudentTeacherBean;
import com.ysx.oa.delay.bean.DelayBean;
import com.ysx.oa.role.bean.RoleBean;
import com.ysx.oa.teacher.bean.TeacherBean;
import com.ysx.oa.teacher.dto.MyDto;
import com.ysx.oa.user.bean.UserBean;
import  org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;
import java.util.List;
/**
 * @author 袁海华
 * @date 2021/11/23 9:31
 */
@Mapper
public interface TeacherDao extends BaseMapper<TeacherBean>{
    /**
     * 方法描述: 根据老师ID给老师增加班级
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [teacherId, clazzId]
     * @return:
     */
//    Integer addClazzByTeacherId(@Param("teacherId") Integer teacherId, @Param("clazzId") Integer clazzId);
    /**
     * 方法描述:根据老师ID查看迟到学生情况
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [teacherId]
     * @return:List<DelayBean>
     */
    List<DelayBean> findLateStudentInforByTeacherId(Integer teacherId);
    /**
     * 方法描述:根据老师ID查看班级号
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [teacherId]
     * @return:Integer
     */
    Integer findClazzIdByTeacherId(Integer teacherId);
    /**
     * 方法描述:根据班级号查看该班级的全部学生
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [clazzId]
     * @return:List<Integer>
     */
    List<Integer> findALLStudentIdByClazzId(Integer clazzId);
    /**
     * 方法描述:根据老师号更新老师资料
     * @author: 袁海华
     * @date: 2021/11/23 15:05
     * @param: [teacherBean]
     * @return: int
     */
    Integer updateTeacherInforByTeacherId(TeacherBean teacherBean);



//    ArrayList<QuestionEntity> findQuestionsByTeacherId(Integer teacherId);
    /**
     * 方法描述:
     * @author: 袁海华
     * @date: 2021/11/24 10:12
     * @param: []
     * @return: List<TeacherBean>
     */
    List<TeacherBean>findAllWaitingTeacher();

    /**
     * 方法描述:
     * @author: 袁海华
     * @date: 2021/11/24 10:45
     * @param:
     * @param
     * @return:
     */
    List<Integer>findAllTeacherIdByRoleId(Integer roleId);


    /**
     * 方法描述:给老师分配班级
     * @author: 袁海华
     * @date: 2021/11/24 13:41
     * @param:
     * @param
     * @return:
     */

    int addClazzByTeacherId(ClazzStudentTeacherBean clazzStudentTeacherBean);

    List<UserBean> findUserByUserBean(UserBean userBean);
    List<Integer> findClazzIdByUserId(UserBean userBean);
    List<Integer> findClazzNameByClazzId(ClazzBean clazzBean);


    List<UserBean> findStudentOrTeacherByNotClass(@Param("roleBean") RoleBean roleBean);
    List<ClazzBean> findAllClazz();



    List<MyDto>findTeacherInforByClazzType(Integer type);




}
